package cn.xutongxue.interview.constants;


/**
 * @author Administrator
 */
public interface RedisConstant {
    /**
     * 用户签到Redis Key前缀
     */
    String USER_SIGN_IN_REDIS_KEY_PREFIX = "user:signins";

    /**
     * 获取用户签到Redis Key
     * @param year 年份
     * @param userId 用户ID
     * @return 拼接好的Redis Key
     */
    static String getUserSignInRedisKey(int year, Long userId) {
        return String.format("%s:%s:%S", USER_SIGN_IN_REDIS_KEY_PREFIX, year, userId);
    }
}
